﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using Assisticant;
using UGD.Models;
using UGD.ViewModels;
using MahApps.Metro.Controls;

namespace UGD
{
    public class ViewModelLocator : ViewModelLocatorBase
    {
        private readonly Document _document;
        private readonly IDialogService _dialogService;

        public ViewModelLocator()
        {
            _dialogService = new DialogService((MetroWindow)Application.Current.MainWindow);
            var results = new List<Item>();
            var item = new Item();
            item.AddDuty(new Duty(DateTime.Today, DateTime.Today.AddDays(1)));
            results.Add(item);
            
            _document = new Document(results);
            _document.ItemHeader = _document.Layout();
        }


        public object Main => ViewModel(() => new MainViewModel(_document, _dialogService));

    }


}

